package com.hns.can.mainte.web;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hns.can.base.entity.SysUserEntity;
import com.hns.can.common.web.BaseController;
import com.hns.can.mainte.entity.CommCoinBoxInfoEntity;
import com.hns.can.mainte.service.SlotMachineService;
import com.hns.can.mainte.vo.SlotMachineVo;
import com.hns.frame.util.ResponseUtil;

/**
 * 投币箱Controller
 * @author:zhangzq
 * @email:
 * @version Revision 2.0.0
 */
@Controller
@RequestMapping("/slotMachine")
public class SlotMachineController extends BaseController{
	
    @Autowired
    private SlotMachineService slotMachineService;
    
    /**
     * 查询投币机
     * @param vo
     * @return
     * @throws Exception
     * @author:zhangzq
     * @email:
     */
    @RequestMapping("/searchSlotMachinePage")
    @ResponseBody
    public Object searchSlotMachinePage(SlotMachineVo vo) throws Exception {
        SysUserEntity user = (SysUserEntity)this.getCurrentUser().getUser();
        vo.setCorpId(user.getCorpId());
        List<CommCoinBoxInfoEntity> list = slotMachineService.getSlotMachineList(vo);
        return this.getReturnResult(list);
    }
    
    /**
     * 投币机次数明细
     * @param vo
     * @return
     * @throws Exception
     * @author:zhangzq
     * @email:
     */
    @RequestMapping("/getSlotMachineDetail")
    @ResponseBody
    public Object getSlotMachineDetail(SlotMachineVo vo) throws Exception {
    	 SysUserEntity user = (SysUserEntity)this.getCurrentUser().getUser();
        vo.setCorpId(user.getCorpId());
        List<CommCoinBoxInfoEntity> list = slotMachineService.getSlotMachineDetail(vo);
        return this.getReturnResult(list);
    }
}
